package com.dzm.demo.myshop.web.ui.api;

import com.dzm.demo.myshop.commons.utils.HttpClientUtils;
import com.dzm.demo.myshop.commons.utils.MapperUtils;
import com.dzm.demo.myshop.web.ui.dto.TbContent;

import java.util.List;

/**
 * 内容管理接口
 *@author:LeoDang
 *@date:2019/7/18
 *@version 1.0.0
 */
public class ContentApi {

    /**
     * 请求幻灯片
     * @return
     */
    public static List<TbContent> ppt(){
        List<TbContent> tbContents = null;
        String result = HttpClientUtils.doGet(API.API_CONTENES_PPT);

        try {
            tbContents = MapperUtils.json2listByTree(result,"data",TbContent.class);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return tbContents;
    }

}
